#include <string>
#include <iostream>
#include <algorithm>
using namespace std;

string a, b;
int n;
int sum = 0;
int main()
{
    cin >> n;
    cin >> a;
    b = "sdu120";
    while (a.find(b) != -1) //没找到返回-1
    {
        //cout << a.find(b);
        sum++;
        a.erase(0, b.size() + a.find(b));
        break;
    }
    cout << sum << endl;
}